<extend name="Public:base" />
<block name="btitle"><title>注册成为般若虾会员用户</title> </block>
<block name="bheaderstyle">
    <style>
         .ema-sug-wrapper {
            z-index:999;
            position: absolute;
            background: #fff;
            text-align: left;
        }

            .ema-sug-wrapper .ema-sug-list {
                list-style: none;
                margin: 0px;
                padding: 0px;
            }

                .ema-sug-wrapper .ema-sug-list .ema-sug-item {
                    font-size: 14px;
                    height: 25px;
                    line-height: 25px;
                    padding-left: 10px;
                    color: #333;
                }

                    .ema-sug-wrapper .ema-sug-list .ema-sug-item.active {
                        background: #5cb85c;
                        cursor: pointer;
                        color: #fff;
                    }
    </style>
</block>
<block name="bcontainer">
    <div class="page-wrapper" id="main">
        <div class="container">
            <form class="signup-form" method="post" action="{:U('/Login/touser')}">
                <div class="my-form-group">
                    <label>邮箱：</label>
                    <input type="text" name="email" id="email"
                           data-val="true"
                           data-val-required="请填写邮箱地址"
                           data-val-regex="请输入有效邮箱"
                           data-val-regex-pattern="^\\w+([\\.-]?\\w+)*@([a-zA-Z0-9_-])+((\\.[a-zA-Z0-9_-]{2,3}){1,2})$"
                            placeholder="此邮箱将会作为唯一登录帐号" style="width:220px;"
                            data-val-remote="邮箱地址已被注册"
                            data-val-remote-url="/Login/signup_checkEmailAjax" />
                </div>
                <span data-valmsg-for="email" data-valmsg-replace="true"></span>
                <div class="my-form-group">
                    <label>密码：</label>
                    <input type="password" name="password"
                           style="width:220px;"
                           placeholder="6位及以上的数字、字母、符号组合"
                           data-val="true" data-val-required="请输入密码"
                           data-val-regex="密码至少6位，包括数字、大小写英文字母"
                           data-val-regex-pattern="^[0-9A-Za-z]{6,16}$" />
                </div>
                <span data-valmsg-for="password" data-valmsg-replace="true"></span>
                <div class="my-form-group">
                    <label>重复密码：</label>
                    <input type="password" name="pwd2" style="width:220px;" placeholder="再次输入密码"
                           data-val="true" data-val-required="请输入确认密码"
                           data-val-equalto="密码不匹配, 请重新输入" data-val-equalto-other="password" />
                </div>
                <span data-valmsg-for="pwd2" data-valmsg-replace="true" style="padding-left: 40px;"></span>
                <br />
                <div class="text-center">
                    <label><input type="radio" name="usertype" data-val="true" data-val-required="请选择用户类型" value="1"/> 个人用户</label>
                    &nbsp;&nbsp;&nbsp;
                    <label><input type="radio" name="usertype"  value="2"/> 企业用户</label>
                </div>
                <span data-valmsg-for="usertype" data-valmsg-replace="true" style="text-align:center;"></span>
                &nbsp;
                <div class="text-center">
                    <button type="submit" class="btn button-green" style="width:90%;">创建帐号</button>
                </div>
                <br />
                <div class="text-right">
                    已有帐号，直接 <a href="http://www.{:getDomain()}" class="link-green">登录</a> PC端
                </div>
            </form>
        </div>
    </div>
</block>
<block name="bfooterscript">
    <script type="text/javascript" src="/Publicm/scripts/jquery.validate.min.js"></script>
    <script type="text/javascript" src="/Publicm/scripts/jquery.validate.unobtrusive.min.js"></script>
    <script type="text/javascript" src="/Public/js/emailAutocomplete.js"></script>
    <script>
        $('#email').emailSug({
                sugClass: 'ema-sug',
                domains: [
                    'qq.com',
                    '163.com',
                    'sohu.com',
                    'sogou.com',
                    '126.com',
                    '139.com',
                    'sina.com',
                    'gmail.com',
                    'hotmail.com'
                ]
            });
            $.validator.setDefaults({onfocusout: function(element) { $(element).valid(); }, onkeyup: false, onclick: false});
    </script>
</block>